"Sol o/a" is also used in Spanish to mean "alone" and "lonely". "Sola" is the feminine form and "solo" is the male form. "Sólo" (with an accent on the first o) means "only".
"Sol" means "sun" in Spanish, but "sol" is exclusively masculine. In Spanish the endings also change according to gender (because it's a Romance language), such as "profesor"/"profesora" ("teacher", male/female forms respectively).