The following example will restrict file uploads in the media library to JPG and GIF files only. If you want to also allow PNG files, add the line 'png' => 'image/png' to this code:
function savvy_restrict_mime($mimes) {
$mimes = array(
'jpg|jpeg|jpe' => 'image/jpeg',
'gif' => 'image/gif',
);
return $mimes;
}
add_filter('upload_mimes','savvy_restrict_mime');
More on this topic in the post How to allow uploading additional file types in WordPress?.