1. My hobby is soccer.
2. My hobby is baseball.
(Are both grammatical?)
It would be more accurate to say, "My hobby is playing soccer." (or "... playing baseball.")
Your sentences are fine for casual speech.
2. My hobby is baseball.
(Are both grammatical?)
Your sentences are fine for casual speech.