The bad news, as the other members have already said, is that there are no rules. You just have to learn each nationality individually.
The good news, however, is that there is a rule connected to this. If the nationality adjective ends in an 'n' or an 'i', it is also a noun. So, for example, you can say,
'He's American' (adj) or 'He's an American' (noun)
'We are Korean' (adj) or 'We are Koreans' (noun)
'They're Pakistani' (adj) or 'They're Pakistanis' (noun)
This works for all nationalities with these endings. Other adjectives for nationalities, such as those ending in 'ese' 'ish' and 'ch', cannot be used as nouns. For example, you cannot say 'He is a British/English/French/Dutch/Spanish/Danish/Portuguese
A few European countries have their own demonyms (nouns describing people from a country) : a Scot, a Spaniard, a Turk, a Greek, a Dane, a Swede, a Finn, a Pole, for example.
There's also a small convention of making a noun by adding 'man' ( or 'woman') to a handful of nationalities in or near to the UK - Englishman, Scotsman, Welshman, Irishman, Dutchman, Frenchman. But this has its limitations - it only works for these nationalities, is less common in the feminine form, and can sound old-fashioned.