Which one is correct: "1yr" or "1yr." or "1 yr"?
As reported by the Oxford Living Dictionaries (and similarly by the copy of the New Oxford American English that was installed on my Mac Mini) yr. is an English abbreviation, but it could be both the abbreviation of year or years, while yrs. is the abbreviation for years or yours. In this case, you could use 1 yr., 2 yr. and the abbreviation would always be correct.
As reported from the Oxford Dictionary of English, it's the same in British English, except the abbreviation is written without a period at the end (e.g. yr instead of yr.).
As the other answers says, there should be a space between the number and yr./yrs..
As far as I know, the rules for spacing or not spacing between values and units is that there should always be a spacing between the value and the unit ("1 %" is incorrect, since percent is not a unit, but a fraction). Hence, "1yr" is incorrect, since "year" is a unit.
I'd write "1 yr", "15 yrs" if I really needed the space. In all other cases I'd prefer "1 year", "15 years", since "yr" doesn't look that good in text, in my opinion.