These are hard to differentiate by explaining. You should get used to them by checking a lot of reading.
적절하다 = fits a purpose or occasion very well - especially in a subtle, qualitative way.
적합하다 = meets a (simple) requirement well; comes in handy for a need - usually about a thing or person.
(The above two are relatively literary.)
적당하다 = more colloquial version of 적합하다. Can also mean "not perfect but will do".
알맞다 = fitting or suitable for a requirement. Similar to 적합하다/적당하다, but used more for a quality or degree than a thing or person.
마땅하다 = (some treatment or action) is rightful or deserved - indicates a moral or ethical expectation.
- 적절한 위로의 말을 찾지 못했다 = Couldn't find the right word to expressing condolences.
- 이 일에 적합한 인물 = a person right for this job.
- 적당한 기회를 만들어 보자 = Let's try and set up a good occasion.
- 이 사건을 일으킨 자는 처벌받는 게 마땅하다 = The one that caused this incident ought to be punished.
- 공부하기에 알맞는 전등의 밝기 = Brightness of the light suitable for studying.