General purpose are a good starting point.
Compute optimized are good for machine learning (a compute intensive task). Gaming servers also would benefit from compute optimized EC2 instances, as would high performance computing and scientific applications.
Memory-optimized is good for applications that use large data sets in-memory. This differs from storage-optimized for workloads that utilise a great deal of locally stored data.
Accelerated-computing instances are good for floating point number calculations, graphics processing and pattern matching. They use hardware accelerators (like GPUs).
After choosing instance type, choose instance size. Performance and cost should be key paramaters here.