Small mistakes in your texts are unavoidable and will happen to anyone, but keeping them to a minimum helps the reader to understand the text. Especially, when it comes to formatting a text you should follow a common procedure to avoid confusion and increase recognizability. Being consistent, also across texts and authors, is the aim of standardization. When it comes to units, the International System of Units (SI) was defined to make sure everyone uses the same units of measure like meter or second and not arbitrary things like the average length of your thumbnail or the shortest time it takes to empty a beer bottle1.
Having said this, I’m always seeking for standards and try to stick to them2. Handling units of measure is quite important in physics, so I had a look into how the formatting is done — to get away from these »we have been doing it like this forever« or »I like it like this« statements. So, after this lengthily introduction, a short overview of some points in how to correctly write down numbers and units.
The International System of Units is defined by the French »Bureau International des Poids et Measures« and can be accessed on their website http://www.bipm.org/en/si/si_brochure/. The most recent brochure is the 8th edition from 2006 (direct link).
Out of this 88 pages long document I’ve selected some things I found most interesting and/or relevant for writing a thesis in physics. For each bullet point I gave a page number of the brochure in brackets.
- SI prefixes (like kilo, mega, milli) refer strictly to powers of 10. Hence, a kilobit is 1000 bit, not 1024 bit (= 210 bit). If you need a power of 2, use kibi (Ki), mebi (Mi), gibi (Gi), … to be consistent with the SI definition. 
- Unit symbols are always printed upright, disregarding the surrounding text. 
- Unit symbols are lower case (like m for meter), except those derived from a proper name (e.g. Pa from Pascal). 
- Unit symbols are mathematical entities and not abbreviations. Therefore, no period or plural s is used after a unit3.  (See also Andi’s post for more upright/italics defintion)
- Also because of this entity character, a combination of value and unit is seen as a product of both. So T = 273 K can be also written as T/K = 273. Therefore, the correct labeling of a graph’s axis is »T/K« and not »T [K]«. 
- Having the entity character in mind helps to remember the formatting of value and unit: Always use a space between value and symbol representing a multiplication sign. Recommended for that is a thin space. The only exception are the plane angle units (°, ‚, „) which are written without a space between value and unit (20° 11‘) 
- Large numbers can be formatted to help readability by introducing a thin space between groups of 3 digits, counting from the decimal marker (1 234.567 8). Spaces can be left out but no dots nor commas are used for this purpose. 
- Interesting for German readers: A multiplication of two numbers should be shown either by brackets or the multiplication sign × but not by a vertical centered dot. 
It takes some effort to consider all these rules and don’t mess them up in a long document. If you are writing you text in LaTeX you can use the siunitx package. Have a look at it, it might make your life easier.