Digital forensics, also called cyber forensics is concerned with techniques applied to the process for collecting, examining, analyzing, and presenting evidence originating from digital data sources to courts.
Digital forensics on the other hand will mostly relate to criminal cases and is typically linked to detailed analysis and investigation of digital evidence, including metadata, that is not normally used or visible. A determination will be made of how devices and data were used by the defendant in the criminal case, which includes distinguishing user-generated data as opposed to system-generated data.
E-discovery typically pertains to civil cases and refers to a well-defined process that will identify and preserve what is often defined as Electronically Stored Information (ESI) in order to determine if this information is relevant or privileged and will produce this information to be used in court. As with digital forensics, these activities can obviously also be conducted for internal purposes, i.e. without the certainty that there will eventually be a court case of some sort.