be good at and to be good in are often interchangeable,
Lim, and there is no easy rule to follow. In simple statements,
like the ones you have quoted, the standard form appears to be good
at as in 'I'm not very good at football'.
in this following sentence, to be good in seems more likely
than to be good at, i.e:
'He was the best in the class in French,
but in mathematics and chemistry he was not so good.'
is perhaps because with other expressions or verbs denoting assessment
or ranking, the preposition in would be required, thus:
'In pharmacology she obtained/scored/gained/attained
the highest marks.'