As with all skills, the answer depends.
Does what you're trying to do have interesting consequences for failure and is the outcome in doubt?
If no, then it just happens. You say "I study the stars and know X". No roll required.
Otherwise, it'd be an Intelligence check. Depending on the situation, I'd add one of Nature proficiency (for more academic knowledge about the names, locations, patterns, etc.), Arcana proficiency (for the mystical connotations of a particular star pattern), or Navigator's tools (for navigating via the stars). See Xanthar's Guide for more uses of Navigator's Tools (pg 83).